@tailwind base;
@tailwind components;
@tailwind utilities;

@reference "tailwindcss";

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.5rem;
  }
 
  .dark {
    --background: 222 47% 11%;
    --foreground: 210 40% 98%;
    --card: 222 47% 10%;
    --card-foreground: 210 40% 98%;
    --popover: 222 47% 11%;
    --popover-foreground: 210 40% 98%;
    --primary: 217 91% 60%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 217 32% 17%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217 32% 17%;
    --muted-foreground: 215 20% 65%;
    --accent: 217 32% 17%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217 32% 17%;
    --input: 217 32% 17%;
    --ring: 224.3 76.3% 48%;
  }
}
 
@layer base {
  * {
    box-sizing: border-box;
  }
  
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-feature-settings: "rlig" 1, "calt" 1;
    -webkit-text-size-adjust: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* 链接样式统一 */
  a {
    text-decoration: none;
    color: currentColor;
  }
  
  /* 确保所有链接状态保持相同颜色 */
  a:link, a:visited, a:hover, a:active {
    color: currentColor;
  }
  
  /* 为特定的链接启用悬停时的下划线效果 */
  a.hover-underline:hover {
    text-decoration: underline;
  }
}

/* 强制链接保持固定颜色，无论访问状态如何 */
.btn-memory {
  color: hsl(var(--primary)) !important;
}
.btn-memory:visited, .btn-memory:active, .btn-memory:hover {
  color: hsl(var(--primary)) !important;
}

/* 现代设计系统 */
.glass-card {
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--border) / 0.5);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.glass-panel {
  background-color: hsl(var(--card) / 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 16px;
}

.gradient-heading {
  background-clip: text;
  color: transparent;
  background-image: linear-gradient(to right, hsl(var(--primary)), #3b82f6);
  font-weight: bold;
}

.blob-animation {
  animation: blob-move 25s infinite ease-in-out;
  filter: blur(40px);
  opacity: 0.15;
  z-index: -1;
}

@keyframes blob-move {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(5%, 10%) scale(1.1);
  }
  50% {
    transform: translate(10%, -5%) scale(0.9);
  }
  75% {
    transform: translate(-10%, 5%) scale(1.05);
  }
}

.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
}

/* 现代卡片样式 */
.modern-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.modern-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-color: hsl(var(--primary) / 0.2);
  transform: translateY(-2px);
}

/* 精致的表单控件 */
.modern-input {
  background-color: hsl(var(--secondary) / 0.3);
  border: 1px solid hsl(var(--input));
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  width: 100%;
  transition-property: color, background-color, border-color, outline-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.modern-input:focus {
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
  border-color: hsl(var(--primary) / 0.4);
}

.modern-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.39);
}

.modern-button:hover {
  background-color: hsl(var(--primary) / 0.9);
  box-shadow: 0 6px 20px rgba(0, 118, 255, 0.23);
  transform: translateY(-1px);
}

/* 移动端优化 */
@media (max-width: 640px) {
  .modern-button, 
  button[class*="modern-"], 
  a[class*="modern-"] {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
  }
  
  .flex-wrap {
    gap: 0.75rem;
  }
  
  .glass-panel {
    padding: 1rem;
  }
  
  /* 日期选择按钮样式 */
  button[class*="glass-panel"] {
    height: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.text-gradient {
  background-clip: text;
  color: transparent;
  background-image: linear-gradient(to right, 
    hsl(var(--primary)), 
    #3b82f6, 
    #6366f1
  );
}

/* 页面切换动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-transition {
  animation: fadeIn 0.5s ease-out;
}

/* 火炬按钮特效 */
@keyframes gentle-glow {
  0%, 100% {
    box-shadow: 0 4px 10px 0 hsla(38, 92%, 50%, 0.25);
  }
  50% {
    box-shadow: 0 4px 20px 5px hsla(38, 92%, 50%, 0.35);
  }
}

.torch-button {
  animation: gentle-glow 3s infinite ease-in-out;
}
 